
-- Ampliar columnas template (almacenan definicion de reportes)
-- Ale 07/2020 

ALTER TABLE repctb     ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE reprpp     ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repsistema ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repgral    ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repfab     ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE reppad     ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE reppadg    ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE cubosmod   ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repctbcfg  ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repart     ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repctbg    ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE ctblib     ALTER COLUMN template TYPE VARCHAR(256000);
ALTER TABLE repturno   ALTER COLUMN template TYPE VARCHAR(256000);

ALTER TABLE comfto     ALTER COLUMN mailtemplate TYPE VARCHAR(256000);


-- Edu 07/2020

CREATE OR REPLACE VIEW vpadmedcomfun AS

SELECT padmedcom.idpad, padmedcomfun.codpadmedfun, padmedcom.codpadmedtip, padmedcom.valor
FROM padmedcom
JOIN padmedcomfun ON padmedcom.id = padmedcomfun.idpadmedcom
ORDER BY 1,2,3;

ALTER TABLE vpadmedcomfun OWNER TO abacouser;


-- esta tabla se agrego en una subversion porque era solo para JAVA.
-- ahora no va mas. Se elimina tb en una subversion


-- =================================
SELECT aaversion('436.01','436.00');
-- =================================